<template>
  <div class="anvil-code-custom-button-group">
    <custom-button v-bind="VBind(btn)" v-for="(btn, index) in btnGroup" :key="index" />
  </div>
</template>

<script>
export default {
  name: 'CustomButtonGroup',
  props: {
    btnGroup: {
      type: Array,
      default: () => []
    },
    // 列数据传递过来的参数
    scopeRow: {
      type: Object,
      default: () => {}
    },
    formData: {
      type: Object,
      default: () => {}
    },
    optionColumn: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {};
  },
  watch: {
    scopeRow: {
      handler() {},
      deep: true
    }
  },
  methods: {
    VBind(data) {
      const vBind = Object.assign(data, {
        scopeRow: this.scopeRow,
        pageId: this.$attrs.pageId,
        formData: this.formData,
        optionColumn: this.optionColumn
      });
      return vBind;
    }
  }
};
</script>
